﻿using Digitalmes.Core.Common.SerialPorts;

namespace Digitalmes.Infrastructure.IO.SerialPorts;

/// <summary>
/// 串口管理对象。
/// </summary>
public interface ISerialPortsManager : IDisposable
{
    /// <summary>
    ///  获取所有注册的串口对象。
    /// </summary>
    /// <returns></returns>
    IReadOnlyList<IRsSerialPort> SerialPorts { get; }

    /// <summary>
    /// 重加载
    /// </summary>
    /// <returns></returns>
    Task ReloadAsync(CancellationToken cancellationToken = default);
}
